package main
import "fmt"
func add(x,y int)int{
	return x+y
}
func sub(x,y int)int{
	return x-y
}
type calcType func(int,int) int
func do(o string) calcType{
	switch o{
	case "+":
		return add
	case "-":
		return sub
	case "*":
		return func(x,y int)int{
			return x*y
		}
	default:
		return nil
	}
}
func main(){
	var a=do("+")
	fmt.Println(a(28,45))
	var b=do("-")
	fmt.Println(b(89,53))
	var c=do("*")
	fmt.Println(c(88,79))
}